<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <!--搜索栏-->
    <div class="cf" style="margin-bottom: 10px;">
        <span>产品编码:</span>
        <input style="height: 25px;" type="text" id="p_id" name="p_id" class="search-input" value="{$search_info.p_id}" placeholder="">
        <span style="margin-left: 25px;">关键字:</span>
        <input style="height: 25px;" type="text" id="keyword" name="keyword" class="search-input" value="{$search_info.keyword}" placeholder="">
        <button style="margin-left: 25px;height: 27px;line-height: 8px;" class="btn" onClick='query()'>查  询</button>
    </div>
    <p class="check-tips" style="color: red">注：选择生成二维码的产品，需要在产品信息模块中，编辑产品展示名称和产品展示图后才可操作，且状态为有效。</p>
    <!-- 隐藏域 -->
    <div hidden="hidden">
        <span id="class_id">{$id}</span>
    </div>
    <!-- 数据列表 -->
    <div class="data">
        <table class="">
            <thead>
            <tr>
                <th class="public_tanle_qianmian">产品编码</th>
                <th class="public_tanle_qianmian">产品系统名称</th>
                <th class="public_tanle_qianmian">产品展示名称</th>
                <th class="public_tanle_qianmian">产品展示图</th>
                <th class="public_content_lost1">操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="list_vo">
                    <tr>
                        <td class="public_content_qianmian">{$list_vo.p_id|default='--'}</td>
                        <td class="public_content_qianmian">{$list_vo.p_name|default='--'}</td>
                        <td class="public_content_qianmian">{$list_vo.name|default='--'}</td>
                        <if condition="$list_vo.img_url eq ''">
                            <td class="public_content_qianmian" width="120px">--</td>
                            <else />
                            <td class="public_content_qianmian" width="120px"><img src="{$list_vo.img_url}" style="height: auto;" /></td>
                        </if>
                        <td class="public_content_lost1 public_content_jl" style="text-align:center;width: 110px;">
                            <p><a href="{:U('qrcode_create?id='.$list_vo['id'])}" class="reward_pass">生成二维码</a></p>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="100" class="text-center"> 暂时没有内容 </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$page}
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <!-- 引入CSS、JS开始 -->
    <link href="__CSS__/wash_helper/gm_table_public.css" rel="stylesheet" type="text/css">
    <!-- 引入CSS、JS结束 -->
    <script type="text/javascript">
        /* 当前子菜单栏高亮 */
        highlight_subnav('{:U('QRcode/qrcode_product')}');

        query = function query(){
            var url = "/wash_helper/index.php?s=/Admin/QRcode/qrcode_product";
            var p_id = $('#p_id').val();
            var keyword = $('#keyword').val();

            if(p_id != ""){
                url += "/p_id/" + p_id;
            }
            if(keyword != ""){
                url += "/keyword/" + keyword;
            }

            window.location.href = url;
        };
    </script>
</block>